﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 家庭助手
{
    public partial class entertainment : Form
    {
        public entertainment()
        {
            InitializeComponent();
            int i = 0;
            Button[] b1 = new Button[25];
            Point p1 = new Point();
          //  b1[i].Name = "button" + i;
            b1[i].Width = 50;
            b1[i].Height = 50;
            p1.X = 25;
            p1.Y = 25;
            b1[i].Name = "button" + i;
            b1[i].Width = 50;
            b1[i].Height = 50;
            b1[i].Location = p1;
            b1[i].Show();
            for(i = 1; i < 25; i++)
            {
                b1[i].Name = "button" + i;
                b1[i].Width = 50;
                b1[i].Height = 50;
                p1.X += 50;
                p1.Y += 50;
                b1[i].Location = p1;
                b1[i].Show();
            }

        }

        private void button2_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
